Run debian-startup and set debian-emacs-flavor.
authorRob Browning <rlb@defaultvalue.org>
Tue, 5 Apr 2011 03:46:22 +0000 (22:46 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sun, 14 Jun 2015 19:52:51 +0000 (14:52 -0500)
Emacs runs debian-startup and sets debian-emacs-flavor.

* Emacs runs debian-startup during the startup process unless
  site-run-file is false.

* The global variable debian-emacs-flavor is bound to 'emacs24.
  Author: Rob Browning <rlb@defaultvalue.org>

lisp/startup.el

index c0c52f11bb144be08a98866b5aaf18caa94d6338..cf7f2e3904416d04dc9e9d91ef1c4f756eb29d14 100644 (file)
@@ -436,6 +436,10 @@ as a list.")
                 (match-string 1 subdir) subdir))
           "-pkg.el"))
 
+(defconst debian-emacs-flavor 'emacs24
+  "A symbol representing the particular debian flavor of emacs running.
+Something like 'emacs20, 'xemacs20, etc.")
+
 (defun normal-top-level-add-subdirs-to-load-path ()
   "Add all subdirectories of `default-directory' to `load-path'.
 More precisely, this uses only the subdirectories whose names
@@ -1066,8 +1070,21 @@ please check its value")
     ;; be loaded from site-run-file and wants to test if -q was given
     ;; should check init-file-user instead, since that is already set.
     ;; See cus-edit.el for an example.
-    (if site-run-file
-       (load site-run-file t t))
+
+    ;; Original upstream startup
+    ;; (if site-run-file
+    ;;     (load site-run-file t t))
+    ;;
+
+    ;; Debian startup
+     (if site-run-file
+        (progn
+          ;; Load all the debian package snippets.
+          ;; It's in here because we want -q to kill it too.
+          (if (load "debian-startup" t t nil)
+              (debian-startup debian-emacs-flavor))
+          ;; Now the normal site file...
+          (load site-run-file t t)))
 
     ;; Sites should not disable this.  Only individuals should disable
     ;; the startup screen.